package com.example.studywords.sql;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.studywords.bean.WordBean;

import java.util.List;

@Dao
public interface WordDao {
    @Insert
    void insert(WordBean wordBean);
    @Query("SELECT wordId FROM word WHERE wordContent = :content")
    int selectIdByContent(String content);
    @Query("SELECT * FROM word")
    List<WordBean> selectAll();
    @Query("SELECT * FROM word WHERE wordId = :id")
    WordBean selectById(int id);
}
